package com.ruoyi.web.controller.job;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.JobTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

@Slf4j
@RestController
@Api(tags = "安全作业类型")
@RequestMapping("job/security")
public class JobSecurityTypeController extends BaseController {

    /**
     * 分页查询
     *
     * @return 查询结果
     */
    @GetMapping("list")
    @ApiOperation("获取列表")
    public TableDataInfo queryByPage() {
        startPage();
        List<HashMap<String, Object>> allList = JobTypeEnum.getAllList();
        return getDataTable(allList);
    }

}
